<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="__BOOTSTRAP__/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="__BOOTSTRAP__/css/bootstrap-theme.min.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/msg.css"/>
    <link rel="stylesheet" href="__EDITOR__/themes/default/default.css" />
    <link rel="stylesheet" href="__EDITOR__/plugins/code/prettify.css" />
   
    <script charset="utf-8" src="__EDITOR__/kindeditor-all-min.js"></script>
    <script charset="utf-8" src="__EDITOR__/lang/zh-CN.js"></script>
    <script charset="utf-8" src="__EDITOR__/plugins/code/prettify.js"></script>

    <script type="text/javascript" src="__JS__/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="__BOOTSTRAP__/js/bootstrap.min.js"></script>

    <script type="javascript">
        $('#myTab a').click(function (e) {
            e.preventDefault()
            $(this).tab('show')
        })
    </script>

    
    <script>
        KindEditor.ready(function(K) {
            var editor1 = K.create('textarea[name="content1"]', {
                width:'972px',
                height:'380px',
                items:[
                    'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
                    'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                    'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                    'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
                    'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                    'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 
                     'table', 'hr', 'emoticons', 'pagebreak',
                    'anchor', 'link', 'unlink', '|', 'about'
                 ],
                afterCreate : function() {
                    var self = this;
                    K.ctrl(document, 13, function() {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function() {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                }
            });
            prettyPrint();
        });
    </script>


    <style>
        span{
            float: right;
        }
        .form-control{
            width: 185px;
            float: left;
        }
        .editor{
            height: 440px;
        }
    </style>

</head>
<body>

<div class="bs-example bs-example-tabs" role="tabpanel" data-example-id="togglable-tabs" id="table">
    <ul id="myTab" class="nav nav-tabs" role="tablist">
        <li role="presentation" class="active"><a href="#home" id="home-tab" role="tab" data-toggle="tab" aria-controls="home" aria-expanded="true">编辑通告</a></li>
    </ul>
    <div id="myTabContent" class="tab-content home">
        <div role="tabpanel" class="tab-pane fade in active" id="home" aria-labelledBy="home-tab">
       
           <form name="example" action="{:U('Message/editHandle')}" method="post">
               <table class="table">
                    <tr>
                        <td><span style="font-size:24px;">通告标题：</span></td>
                        <td><input type="text" class="form-control" name="title" value="{$title}"></td>
                    </tr>
                    <tr>
                        <td rowspan="6" colspan="2">
                            <!-- 编辑器 -->
                            <div class="editor">          
                                   
                                 <?php echo $htmlData; ?>
                                 <textarea name="content1" style="width:700px;height:200px;visibility:hidden;"><?php echo htmlspecialchars_decode($content1); ?></textarea>
                                   <br />
                                 <input type="hidden" name="id" value="{$id}">
                                 <input type="submit" class="btn btn-primary" value="提交内容" /> (提交快捷键: Ctrl + Enter)
                            </div>
                        </td>
                     </tr>
               </table> 
           </form>

        </div>

    </div>
</div>

</body>
</html>